// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) 

package com.yoyo.series.entities;

import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.stay.lib.utilities.TextUtil;
import com.yoyo.series.utilites.Utils;

import java.io.IOException;

// Referenced classes of package com.stayit.series.entities:
//            Persistent

public class ModuleEntity extends Persistent
{

    public ModuleEntity()
    {
    }

    public static ModuleEntity getFavModule()
    {
        ModuleEntity moduleentity = new ModuleEntity();
        moduleentity.groupId = -1;
        moduleentity.moduleName = Utils.trans(R.string.module_my_fav);
        moduleentity.iconUrl = null;
        return moduleentity;
    }

    public ModuleEntity getConstrainObject()
    {
        ModuleEntity moduleentity = new ModuleEntity();
        moduleentity.groupId = groupId;
        return moduleentity;
    }

//    public volatile Persistent getConstrainObject()
//    {
//        return getConstrainObject();
//    }

    public void readFromJson(JsonReader jsonreader)
    {
        jsonreader.beginObject();
_L3:
        String s;
        if(!jsonreader.hasNext())
            break MISSING_BLOCK_LABEL_149;
        s = jsonreader.nextName();
        if(!s.equalsIgnoreCase("groupId")) goto _L2; else goto _L1
_L1:
        groupId = jsonreader.nextInt();
          goto _L3
        IOException ioexception;
        ioexception;
        ioexception.printStackTrace();
_L4:
        return;
_L2:
        if(s.equalsIgnoreCase("moduleName"))
            moduleName = jsonreader.nextString();
        else
        if(s.equalsIgnoreCase("iconUrl"))
            iconUrl = jsonreader.nextString();
        else
        if(s.equalsIgnoreCase("point"))
            point = jsonreader.nextInt();
        else
        if(s.equalsIgnoreCase("description"))
            description = jsonreader.nextString();
        else
        if(s.equalsIgnoreCase("apklink"))
            apklink = jsonreader.nextString();
        else
            jsonreader.skipValue();
          goto _L3
        jsonreader.endObject();
          goto _L4
    }

    public String toString()
    {
        return (new StringBuilder()).append("type=").append(groupId).append("mModuleName=").append(moduleName).append("mIconUrl=").append(iconUrl).toString();
    }

    public void writeToJson(JsonWriter jsonwriter)
        throws IOException
    {
        jsonwriter.beginObject();
        jsonwriter.name("groupId").value(groupId);
        if(TextUtil.isValidate(moduleName))
            jsonwriter.name("moduleName").value(moduleName);
        if(TextUtil.isValidate(iconUrl))
            jsonwriter.name("iconUrl").value(iconUrl);
        jsonwriter.endObject();
    }

    public static final String APKLINK_STRING = "apklink";
    public static final String DESCRIPTION_STRING = "description";
    public static final String GROUPID_STRING = "groupId";
    public static final String ICONURL_STRING = "iconUrl";
    public static final String MODULENAME_STRING = "moduleName";
    public static final String POINT_STRING = "point";
    private static final long serialVersionUID = 1L;
    public String apklink;
    public String description;
    public int groupId;
    public String iconUrl;
    public boolean isAdd;
    public String moduleName;
    public int point;
}
